package com.android.core.base;

import android.app.Application;
import android.content.Context;

import com.android.core.utils.log.LogLevel;
import com.android.core.utils.log.Logger;
import com.android.core.network.RestApi;

/**
 * 描述：
 * -
 * 创建人：鲍圣祥
 * 创建时间：2016/12/5
 */
public class BaseApplication extends Application {
    private static BaseApplication baseApplication;
    private static Context mContext;

    @Override
    public void onCreate() {
        super.onCreate();
        baseApplication = this;
        mContext = getApplicationContext();
        Logger.init(getPackageName())
                .methodCount(3)
//                .hideThreadInfo()
                .logLevel(RestApi.isDebug ? LogLevel.FULL : LogLevel.NONE);
    }

    public static BaseApplication getInstance() {
        return baseApplication;
    }

    public static Context getContext() {
        return mContext;
    }
}
